package cn.ryh.pay.config;

import cn.ryh.pay.config.properties.PayProperties;
import com.jeequan.jeepay.Jeepay;
import com.jeequan.jeepay.JeepayClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @author Raoyh
 * @Description
 * @create 2024-06-20 14:07
 */
@Configuration
public class JeepayConfig {
    @Resource
    PayProperties payProperties;
    @Bean
    public JeepayClient getJeepayClient() {
        //地址
        Jeepay.setApiBase(payProperties.getApiBaes());
        //私钥
        Jeepay.apiKey = "iIAwBDUzJuavxp31Ve4zj3UlA9UzZXVPn9pvI9iGwifOMWQuVApFCFCQDxLHvmMgpPOt65nM8rWeJNdXNT38R44KvTxkIwdGqmKN8kr6lhPCpcVSF7oNSfhHK6VhRIc8";
        //商户号
        Jeepay.mchNo = "M1718591763";
        //应用ID
        Jeepay.appId = "666fa113e4b0e8d1edacadab";
        return JeepayClient.getInstance(Jeepay.appId, Jeepay.apiKey, Jeepay.getApiBase());
    }

}
